{% extends 'base.html' %}
{% load static %}

{%block title %}
    <title>Enter a company</title>
{% endblock title %}

{% block content %}
    
    <div class="container">
        <div class="col-6">
        <h1>Company Creation Form</h1>
        <form action="" method="post">
            {% csrf_token %}
            <div class="form-group">
                {% for item in form %}
                    <div class="form-group mx-auto mb-2">
                        {{ item.label }}</br>
                        {{ item }}
                    </div>
                {% endfor %}
            </div>

            <div class="error-message">
            {% if form.errors %}
                {% for field in form %}
                    {% for error in field.errors %} 
                        <div class="alert alert-danger">
                            <strong>{{ error|escape }}</strong>
                        </div>
                    {% endfor %}
                {% endfor %}
            {% endif %}
            </div>

            <input type="submit" class="btn btn-info text-light", value="Submit">
            <br><br>
        </form>

    </div>

{% endblock content %}